\(\int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx\) [1539]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 10 \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=\frac {\arcsin (1+b x)}{b} \]

[Out]

arcsin(b*x+1)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {55, 633, 222} \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=\frac {\arcsin (b x+1)}{b} \]

[In]

Int[1/(Sqrt[-(b*x)]*Sqrt[2 + b*x]),x]

[Out]

ArcSin[1 + b*x]/b

Rule 55

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{\sqrt {-2 b x-b^2 x^2}} \, dx \\ & = -\frac {\text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{4 b^2}}} \, dx,x,-2 b-2 b^2 x\right )}{2 b^2} \\ & = \frac {\sin ^{-1}(1+b x)}{b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(57\) vs. \(2(10)=20\).

Time = 0.01 (sec) , antiderivative size = 57, normalized size of antiderivative = 5.70 \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=-\frac {2 \sqrt {x} \sqrt {2+b x} \log \left (-\sqrt {b} \sqrt {x}+\sqrt {2+b x}\right )}{\sqrt {b} \sqrt {-b x (2+b x)}} \]

[In]

Integrate[1/(Sqrt[-(b*x)]*Sqrt[2 + b*x]),x]

[Out]

(-2*Sqrt[x]*Sqrt[2 + b*x]*Log[-(Sqrt[b]*Sqrt[x]) + Sqrt[2 + b*x]])/(Sqrt[b]*Sqrt[-(b*x*(2 + b*x))])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(26\) vs. \(2(10)=20\).

Time = 0.52 (sec) , antiderivative size = 27, normalized size of antiderivative = 2.70

method result size
meijerg \(\frac {2 \sqrt {x}\, \operatorname {arcsinh}\left (\frac {\sqrt {b}\, \sqrt {x}\, \sqrt {2}}{2}\right )}{\sqrt {b}\, \sqrt {-b x}}\) \(27\)
default \(\frac {\sqrt {-b x \left (b x +2\right )}\, \arctan \left (\frac {\sqrt {b^{2}}\, \left (x +\frac {1}{b}\right )}{\sqrt {-b^{2} x^{2}-2 b x}}\right )}{\sqrt {-b x}\, \sqrt {b x +2}\, \sqrt {b^{2}}}\) \(58\)

[In]

int(1/(-b*x)^(1/2)/(b*x+2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/b^(1/2)/(-b*x)^(1/2)*x^(1/2)*arcsinh(1/2*b^(1/2)*x^(1/2)*2^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 26 vs. \(2 (10) = 20\).

Time = 0.22 (sec) , antiderivative size = 26, normalized size of antiderivative = 2.60 \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=-\frac {2 \, \arctan \left (\frac {\sqrt {b x + 2} \sqrt {-b x}}{b x}\right )}{b} \]

[In]

integrate(1/(-b*x)^(1/2)/(b*x+2)^(1/2),x, algorithm="fricas")

[Out]

-2*arctan(sqrt(b*x + 2)*sqrt(-b*x)/(b*x))/b

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.65 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.40 \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=- \frac {2 i \operatorname {asinh}{\left (\frac {\sqrt {2} \sqrt {b} \sqrt {x}}{2} \right )}}{b} \]

[In]

integrate(1/(-b*x)**(1/2)/(b*x+2)**(1/2),x)

[Out]

-2*I*asinh(sqrt(2)*sqrt(b)*sqrt(x)/2)/b

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.80 \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=-\frac {\arcsin \left (-\frac {b^{2} x + b}{b}\right )}{b} \]

[In]

integrate(1/(-b*x)^(1/2)/(b*x+2)^(1/2),x, algorithm="maxima")

[Out]

-arcsin(-(b^2*x + b)/b)/b

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.70 \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=-\frac {2 \, \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {-b x}\right )}{b} \]

[In]

integrate(1/(-b*x)^(1/2)/(b*x+2)^(1/2),x, algorithm="giac")

[Out]

-2*arcsin(1/2*sqrt(2)*sqrt(-b*x))/b

Mupad [B] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 34, normalized size of antiderivative = 3.40 \[ \int \frac {1}{\sqrt {-b x} \sqrt {2+b x}} \, dx=-\frac {4\,\mathrm {atan}\left (\frac {b\,\left (\sqrt {2}-\sqrt {b\,x+2}\right )}{\sqrt {-b\,x}\,\sqrt {b^2}}\right )}{\sqrt {b^2}} \]

[In]

int(1/((-b*x)^(1/2)*(b*x + 2)^(1/2)),x)

[Out]

-(4*atan((b*(2^(1/2) - (b*x + 2)^(1/2)))/((-b*x)^(1/2)*(b^2)^(1/2))))/(b^2)^(1/2)